package com.mp.approvalreq.entity;


import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;

import java.util.Objects;

/**
 * 抽取的抄送人数据
 */
public class Cc {

    public static final int DEFAULT = 0;
    public static final int NEED_FILE = 1;
    public static final int HAD_FILED = 2;

    public Cc() {
    }

    public Cc(Integer requestId, int ccCiid) {
        this.requestId = requestId;
        this.ccCiid = ccCiid;
    }

    @JSONField(serialize = false)
    private Integer id;

    private Integer requestId;
    /**
     * 抄送人contactId
     */
    private int ccId;
    /**
     * 抄送人companyInfoId
     */
    private int ccCiid;
    @Deprecated
    private String ccName;
    /**
     * 归档时间
     */
    private String ccTime;

    private Integer companyId;
    /**
     * 是否为临时抄送人
     */
    private Integer isTemp;
    /**
     * 添加人id（临时抄送人）
     */
    private Integer creatorId;
    /**
     * 0.无须归档;1.待归档;2.已归档
     */
    private int filedStatus;

    @Deprecated
    private Integer creatorContactId;

    @JSONField(serialize = false)
    private Integer isRead;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRequestId() {
        return requestId;
    }

    public void setRequestId(Integer requestId) {
        this.requestId = requestId;
    }

    public int getCcCiid() {
        return ccCiid;
    }

    public void setCcCiid(int ccCiid) {
        this.ccCiid = ccCiid;
    }

    public int getCcId() {
        return ccId;
    }

    public void setCcId(int ccId) {
        this.ccId = ccId;
    }

    public String getCcName() {
        return ccName;
    }

    public void setCcName(String ccName) {
        this.ccName = ccName;
    }

    public String getCcTime() {
        return ccTime;
    }

    public void setCcTime(String ccTime) {
        this.ccTime = ccTime;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Integer getIsTemp() {
        return isTemp;
    }

    public void setIsTemp(Integer isTemp) {
        this.isTemp = isTemp;
    }

    public Integer getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(Integer creatorId) {
        this.creatorId = creatorId;
    }

    public int getFiledStatus() {
        return filedStatus;
    }

    public void setFiledStatus(int filedStatus) {
        this.filedStatus = filedStatus;
    }

    public Integer getCreatorContactId() {
        return creatorContactId;
    }

    public void setCreatorContactId(Integer creatorContactId) {
        this.creatorContactId = creatorContactId;
    }

    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Cc cc = (Cc) o;
        return ccCiid == cc.ccCiid && Objects.equals(requestId, cc.requestId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(requestId, ccCiid);
    }


    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
